<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">{$org}成员列表</a></li>
        <!--<li><a href="{:url('AdminOrganize/child_add',['org_id'=>$id])}">添加分支</a></li>-->
    </ul>
    <!--<form class="well form-inline margin-top-20" method="post" action="{:url('AdminArticle/index')}">-->
        <!--分类:-->
        <!--<select class="form-control" name="category" style="width: 140px;">-->
            <!--<option value='0'>全部</option>-->

        <!--</select> &nbsp;&nbsp;-->
        <!--时间:-->
        <!--<input type="text" class="form-control js-bootstrap-datetime" name="start_time"-->
               <!--value="{$start_time|default=''}"-->
               <!--style="width: 140px;" autocomplete="off">- -->
        <!--<input type="text" class="form-control js-bootstrap-datetime" name="end_time"-->
               <!--value="{$end_time|default=''}"-->
               <!--style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;-->
        <!--关键字:-->
        <!--<input type="text" class="form-control" name="keyword" style="width: 200px;"-->
               <!--value="{$keyword|default=''}" placeholder="请输入关键字...">-->
        <!--<input type="submit" class="btn btn-primary" value="搜索"/>-->
        <!--<a class="btn btn-danger" href="{:url('AdminArticle/index')}">清空</a>-->
    <!--</form>-->

    <form class="js-ajax-form" action="" method="post">
        <div class="table-actions">
            <notempty name="category">
                <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                        data-action="{:url('AdminArticle/listOrder')}">{:lang('SORT')}
                </button>
            </notempty>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminOrganize/all_agree')}" data-subcheck="true">批量通过
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminOrganize/all_cancel')}" data-subcheck="true">批量拉黑
            </button>

            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminOrganize/all_del')}" data-subcheck="true" data-msg="您确定删除吗？">
               批量删除
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="50">编号ID</th>
                <th>姓名(点击查看档案)</th>
                <if condition="$id==1"><th>活动时长(小时)</th></if>
                <th>活动次数</th>
                <th>总积分</th>
                <th>已使用</th>
                <th>加入时间</th>
                <th>状态</th>
                <th width="95">操作</th>
            </tr>
            </thead>

            <foreach name="data" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td>{$vo.user_id}</td>
                    <td><a href="{:url('/portal/volunt/detail',['user_id'=>$vo.user_id])}" target="_blank">{$vo.user.user_nickname}</a></td>
                    <if condition="$vo.org_id==1"><td>{$vo.rank.duration|s_to_h}</td></if>
                    <td><if condition="$vo.org_id==1">{$vo.rank.q_times}</if><if condition="$vo.org_id==2">{$vo.rank.z_times}</if></td>
                    <td>{$vo.rank.all_points}</td>
                    <td>{$vo.rank.used_points}</td>
                    <td>{$vo.ctime|date="Y-m-d H:i:s"}</td>
                    <td>{$status[$vo.status]}<if condition="$vo.talent==1"><p style="color: green">明星交管员</p></if></td>

                    <td>
                        <if condition="$vo.status==0">
                        <a class="btn btn-xs btn-primary js-ajax-dialog-btn" href="{:url('AdminOrganize/agree',['id'=>$vo.id,'org_id'=>$id])}">同意</a>
                            </if>
                        <if condition="$vo.status==1">
                        <a class="btn btn-xs btn-warning js-ajax-dialog-btn" href="{:url('AdminOrganize/cancel',['id'=>$vo.id,'org_id'=>$id])}">拉黑</a>
                        </if>
                        <if condition="$vo.org_id==3&&$vo.talent==0&&$vo.status==1">
                            <a class="btn btn-xs btn-primary js-ajax-dialog-btn" href="{:url('AdminOrganize/talent_add',['id'=>$vo.id,'org_id'=>$id])}">加为明星交管员</a>
                        </if>
                        <if condition="$vo.talent==1">
                            <a class="btn btn-xs btn-warning js-ajax-dialog-btn" href="{:url('AdminOrganize/talent_cancel',['id'=>$vo.id,'org_id'=>$id])}">撤销明星交管员</a>
                        </if>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('AdminOrganize/member_del',['id'=>$vo.id])}">删除</a>

                    </td>

                </tr>
            </foreach>

        </table>

        <ul class="pagination">{$page|default=''}</ul>
    </form>


</div>
<script src="__STATIC__/js/admin.js"></script>
<script>

    function reloadPage(win) {
        win.location.reload();
    }


</script>
</body>
</html>